package com.webserver.vo;

import java.io.Serializable;

/**
 *  vo   value object 值对象
 *  这种对象是用来表示一组信息的
 *
 *  User的每个实例用于表示一个用户信息
 */
public class User implements Serializable {
    private String username;
    private String password;
    private String nickname;
    private String title;
    private String user;
    private String content;
    private int age;

    public User(String title,String user,String content){
        this.title = title;
        this.user = user;
        this.content = content;
    }

    public User(String username, String password, String nickname, int age) {
        this.username = username;
        this.password = password;
        this.nickname = nickname;
        this.age = age;
    }

    public String getUsername() {
        return username;
    }

    public String getPassword() {
        return password;
    }

    public String getNickname() {
        return nickname;
    }

    public String toString(){
        return username+","+password+","+nickname+","+age;
    }

    public String getTitle() {
        return title;
    }

    public String getUser() {
        return user;
    }

    public String getContent() {
        return content;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getAge() {
        return age;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }
}
